home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 1.6 KB | 61 lines | [TEXT/CWIE] |
- // WindowInitializer.h
-
- #ifndef WindowInitializer_h
- #define WindowInitializer_h
-
- #ifndef Rectangle_h
- #include "Rectangle.h"
- #endif
- #ifndef Str_h
- #include "Str.h"
- #endif
-
- class WindowDefinition;
- class WindowDefaults;
-
- class WindowInitializer
- {
- private:
- bool useDefaultScreen;
- GDHandle screen;
-
- bool useDefaultPosition;
- Rectangle position;
-
- bool useDefaultName;
- String255 name; // mutable
-
- bool useDefaultIndex;
- uint32 index;
-
- bool useDefaultVisibility;
- bool visible;
-
- public:
- WindowInitializer();
-
- void SetScreen( GDHandle s ) { screen = s; useDefaultScreen = false; }
- void UseDefaultScreen() { useDefaultScreen = true; }
- GDHandle ScreenFor( const WindowDefaults& ) const;
-
- void SetPosition( const Rectangle& r ) { position = r; useDefaultPosition = false; }
- void UseDefaultPosition() { useDefaultPosition = true; }
- Rectangle PositionFor( const WindowDefaults& ) const;
-
- void SetName( ConstPString n ) { name = n; useDefaultName = false; }
- void UseDefaultName() { useDefaultName = true; }
- ConstPString NameFor( const WindowDefaults& ) const;
-
- void SetIndex( uint32 i ) { index = i; useDefaultIndex = false; }
- void UseDefaultIndex() { useDefaultIndex = true; }
- uint32 IndexFor( const WindowDefaults& ) const;
-
- void BeVisible() { visible = true; useDefaultVisibility = false; }
- void BeHidden() { visible = false; useDefaultVisibility = false; }
- void SetVisibility( bool v ) { visible = v; useDefaultVisibility = false; }
- void UseDefaultVisibility() { useDefaultVisibility = true; }
- bool VisibilityFor( const WindowDefaults& ) const;
- };
-
- #endif
-